<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>

        //var 全局变量 let 局部变量  const 常量final

        //const一旦声明不能改变'地址值' || const也是局部变量
        {
            const age = 10;
            //age =20; //修改const值, 基本数据类型字面值就是地址值
            console.log(age);
        }
        //Uncaught ReferenceError: age is not defined
        //console.log(age);

        //数组
        const stars = ["crp","尹恩惠","高圆圆"];
        stars.push("小泽老师"); //没有改地址值
        console.log(stars);
        //对象
        const person = {name:"二狗子",age:18};
        person.name ="驴蛋蛋";
        console.log(person.name);

        //不行不行不行...
        stars = [];
        person = {};

    </script>
</body>
</html>